import Vue from 'vue'
import Router from 'vue-router'
// import { homedir } from 'os';
// {
//   path: '/aa',
//   name: 'aa',
//   component: () => import('@/views/aa'),
//   meta: {}
// },

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      name: 'Login',
      component: () => import('@/views/Login'),
      meta: {
        title:"登录"
      }
    },
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/',
      name: 'Index',
      component: () => import('@/views/index'),
      meta: {
        title:"首页"
      },
      children: [
        {
          path: '/home',
          name: 'Home',
          component: () => import('@/views/home'),
          meta: {
            title:"首页"
          }
        },
        {
          path: '/finishFeature',
          name: 'finishFeature',
          component: () => import('@/views/feature/finishFeature'),
          meta: {
            title: '建立任务成功'
          }
        },
        {
          path: '/searchFeature',
          name: 'searchFeature',
          component: () => import('@/views/feature/searchFeature'),
          meta: {
            title: '搜索用户列表'
          }
        },
        {
          path: '/achieveFeature',
          name: 'achieveFeature',
          component: () => import('@/views/feature/achieveFeature'),
          meta: {
            title: '已完成任务列表'
          }
        },
        {  
          path: '/newFeature',
          name: 'newFeature',
          component: () => import('@/views/feature/newFeature'),
          meta: {
            title: '新建任务'
          }
        },
        {
          path: '/batchFiveFeature',
          name: 'batchFiveFeature',
          component: () => import('@/views/feature/batchFiveFeature'),
          meta: {
            title: '批量创建-五大模块'
          }
        },
        {
          path: '/batchFeature',
          name: 'batchFeature',
          component: () => import('@/views/feature/batchFeature'),
          meta: {
            title: '批量创建-负面舆情'
          }
        },
        {
          path: '/newFiveFeature',
          name: 'newFiveFeature',
          component: () => import('@/views/feature/newFiveFeature'),
          meta: {
            title: '批量创建任务'
          }
        },
        {
          path: '/fivePlate',
          name: 'fivePlate',
          component: () => import('@/views/feature/fivePlate'),
          meta: {
            title: '新建任务-五大模块'
          }
        },
        {
          path: '/resultList',
          name: 'resultList',
          component: () => import('@/views/feature/resultList'),
          meta: {
            title: '爬取结果'
          }
        },
        {
          path: '/negative',
          name: 'negative',
          component: () => import('@/views/feature/negative'),
          meta: {
            title: '新建任务-负面舆情'
          }
        },
        {
          path: '/templateSafeguard',
          name: 'templateSafeguard',
          component: () => import('@/views/manage/templateSafeguard'),
          meta: {
            title: '关键词模块维护'
          }
        },
        {
          path: '/searchSafeguard',
          name: 'searchSafeguard',
          component: () => import('@/views/manage/searchSafeguard'),
          meta: {
            title: '搜索限制维护'
          }
        },
        {
          path: '/taskdetail',
          name: 'taskdetail',
          component: () => import('@/views/feature/taskdetail'),
          meta: {
            title: '任务详情'
          }
        },
        {
          path: '/keywordSafeguard',
          name: 'keywordSafeguard',
          component: () => import('@/views/manage/keywordSafeguard'),
          meta: {
            title: '关键词维护'
          }
        },
      ]
    }
  ]
})
